#include <stdio.h>
int main() {
    int s;
    int a[1000];
    while (scanf("%d",&s) !=EOF) {
         if(s==0)
         break;
        int m, n, i;
        scanf("%d %d", &m, &n);
        for (i = 0; i < s; i++) {
            scanf("%d", &a[i]);
        }
        for (i = n - 1; i > m - 1; i--) {
            printf("%d ", a[i]);
        }
        printf("%d",a[m-1]);
        printf("\n");
    }
    return 0;
}
